//
//  MJExtensionConfig.m
//  MJExtensionExample
//
//  Created by MJ Lee on 15/4/22.
//  Copyright (c) 2015年 小码哥. All rights reserved.
// 

#import "MJExtensionConfig.h"
#import "MJExtension.h"
#import "DSAccount.h"
#import "DSCourse.h"
#import "DSUnit.h"
#import "DSUnitSubContent.h"
#import "DSUnitListening.h"

@implementation MJExtensionConfig
/**
 *  这个方法会在MJExtensionConfig加载进内存时调用一次
 */
+ (void)load
{
    [DSAccount mj_setupReplacedKeyFromPropertyName:^NSDictionary *{
        return @{ @"stuId" : @"id"};
    }];
    
    [DSCourse mj_setupReplacedKeyFromPropertyName:^NSDictionary *{
        return @{ @"courseId" : @"id"};
    }];
    
    [DSUnit mj_setupReplacedKeyFromPropertyName:^NSDictionary *{
        return @{ @"unitId" : @"id"};
    }];
    
    [DSUnitSubContent mj_setupReplacedKeyFromPropertyName:^NSDictionary *{
        return @{ @"pictures" : @"Pictures", @"turn" : @"Turn", @"maxTime" : @"MaxTime", @"listening" : @"Listening"};
    }];
    
    [DSUnitSubContent mj_setupObjectClassInArray:^NSDictionary *{
        return @{ @"listening" : @"DSUnitListening"};
    }];
    
    [DSUnitListening mj_setupObjectClassInArray:^NSDictionary *{
        return @{ @"audio" : @"DSUnitListeningContent", @"images" : @"DSUnitListeningContent"};
    }];
}
@end
